<template>
	<view>
		<view class="fff_box">
			<view style="display: flex;">
				<view style="line-height: 80rpx;font-size: 28rpx;color: #333;font-weight: bold;">
					提现至：
				</view>
				<view style="flex: 1;">
					<radio-group @change="radioChange">
						<label>
							<view
								style="display: flex;align-items: center;justify-content: space-between;">
								<view style="line-height: 80rpx;font-size: 28rpx;color: #333;">
									银行卡
								</view>
								<radio :value="20" style="transform:scale(0.7)"
									:checked="FormData.pay_type==20" color="#1BAE61" />
							</view>
						</label>
						<label>
							<view
								style="display: flex;align-items: center;justify-content: space-between;">
								<view style="line-height: 80rpx;font-size: 28rpx;color: #333;">
									支付宝
								</view>
								<radio :value="10" style="transform:scale(0.7)"
									:checked="FormData.pay_type==10" color="#1BAE61" />
							</view>
						</label>
					</radio-group>
				</view>
			</view>
		</view>

		<view class="fff_box">
			<view style="line-height: 80rpx;font-size: 28rpx;color: #333;font-weight: bold;">
				提现金额
			</view>

			<view style="display: flex;align-items: center;border-bottom: 1rpx solid #eaeaea;">
				<view style="line-height: 80rpx;font-size: 32rpx;font-weight: bold;">
					￥
				</view>
				<view style="flex: 1;">
					<input v-model="FormData.money" type="text" placeholder="请输入提现金额" class="aaaa" />
				</view>
			</view>
		</view>

		<button class="btn" @click="confirm">立即提现</button>



	</view>
</template>

<script>
	export default {
		data() {
			return {
				FormData: {
					money: '',
					pay_type: 20,
				},
			}
		},
		methods: {
			confirm() {
				if (!this.FormData.money) {
					uni.showToast({
						icon: 'none',
						title: '请输入提现金额'
					})
					return
				}
				let self = this
				self._get('supplier.index/cashAplly', self.FormData, function(res) {
					if(res.code==1){
						uni.showToast({
							title: '申请提现成功',
							duration: 2000,
							icon: 'success'
						});
						uni.navigateBack();
					}
				});




			},
			radioChange(e) {
				this.FormData.pay_type = e.detail.value
			},
		}
	}
</script>

<style lang="scss" scoped>
	.btn {
		width: 700rpx;
		margin: 40rpx auto;
		background-color: #1BAE61;
		color: #fff;
		height: 88rpx;
		line-height: 88rpx;
		border-radius: 44rpx;
		font-size: 32rpx;
	}

	.aaaa {
		width: 100%;
		padding-left: 20rpx;
		padding-right: 20rpx;
		height: 80rpx;
		line-height: 80rpx;
		font-size: 28rpx;
		box-sizing: border-box;
	}

	.fff_box {
		width: 700rpx;
		margin: 20rpx auto;
		background-color: #fff;
		border-radius: 16rpx;
		padding: 20rpx;
		box-sizing: border-box;
	}
</style>